<?php

class CF
{
	/**
	 * 
	 * @var string
	 */
	const TYPE_EXCEPTION = 'Exception';
	
	/**
	 * @return boolean
	 */
	public static function isSafeMode()
	{
		return true == ini_get('safe_mode');
	}
	
	/**
	 * @retrun void
	 */
	public static function disableMagicQuote()
	{
		if(get_magic_quotes_gpc()){
			CF_Util_Array::stripSlashesRecursive($_GET);
			CF_Util_Array::stripSlashesRecursive($_POST);
			CF_Util_Array::stripSlashesRecursive($_REQUEST);
			CF_Util_Array::stripSlashesRecursive($_COOKIE);
		}
	}
	
	/**
	 * 
	 * @param mixed $var
	 * @param mixed $default
	 * @return mixed
	 */
	public static function get($var, $default = null)
	{
		return null !== $var? $var : $default; 
	}
}